Обновить

How to launch i2pd for the first time: instructions for Debian/Ubuntu

Время на прочтение 4 min
Количество просмотров 60K


I2p is a network specializing in the anonymity of intranet resources; in this way it differs from the tor network, the main task of which is not internal resources, but building secure access to the Internet. By being aware of these two features, people can work much more effectively on both networks..

In i2p you can do many things: visit and create websites, forums and trading platforms, receive mail, chat and download torrents, and much more. The i2pd program is capable of working with a large number of programs and services.

It’s worth remembering that the program helps you achieve anonymity, but the anonymity itself depends on you. From your actions taken online and offline, the settings of the equipment used and operating programs. These instructions will help you set up i2pd and start working on the network.

It's very easy to build i2pd for Debian/Ubuntu:
To get started, you will need to download several packages. Open a terminal and write:
sudo apt-get install build-essential

After that, download the libraries:
sudo apt-get install \
libboost-chrono-dev \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-regex-dev \
libboost-system-dev \
libboost-thread-dev \
libssl-dev

Install packages to work with Git projects:
sudo apt-get install git

Install cmake:
sudo apt-get install cmake

Copy the latest image from github (don't forget to prefix the link with https://):
git clone github.com/PurpleI2P/i2pd.git

Go to folder:
cd i2pd/build

Let's start assembly:
cmake -DCMAKE_BUILD_TYPE=Release

In case of success:
make

And finally:
sudo make install

The program will be there, in the build folder (this is an i2pd file). You can move it anywhere you want.
Run the file:
i2pd


If lines run across the screen, the program has started working. This window will remain open until the end of the I2P session. You can now open a new tab to continue working with the terminal.

Open any browser that you decide to use for i2p. My recommendation is Mozilla Firefox or any other gecko browser due to the flexibility of working settings, but you can use the browser that you personally like.

Type the following address in your browser: 127.0.0.1:7070. At this address you will find a web console with network statistics.

In the console you will see various things, for example the address of the folder with the program's working files. In the available release 2.3.0, the developers decided that this would be the following path: /home/USERNAME/.i2pd/ For further settings, go to this folder.

We will need two files in this folder. If they have not yet been created, please create them manually. The first file is the subscriptions file. It contains the addresses at which i2pd will update your existing list of sites with network-wide.

File name: subscriptions.txt

File contents:
inr.i2p/export/alive-hosts.txt
stats.i2p/cgi-bin/newhosts.txt
i2p-projekt.i2p/hosts.txt
i2host.i2p/cgi-bin/i2hostetag
no.i2p/export/alive-hosts.txt
rus.i2p/hosts.txt


The second file we need is very interesting - this is the tunnel file. I2PD is a virtual router, literally a box, to which you can connect through many ports. This way we can configure our programs and services on the computer to work with programs and services on the network.

Each tunnel follows the same structure.

[IRC] — this is our name, we ourselves decide what will be written here.
type=client — with this we indicate whether we will connect to a service within the network or, on the contrary, we ourselves are a service (and then the value will not be client, but server).
port=666 — port name on the router. Please note that the ports are assigned by you in the same way as the name, and may be something else, you can try changing them.
destination=irc.echelon.i2p — the name of the service we are going to interact with.
keys=irc.dat — an address with keys that are important to us for trustworthy work with the selected service. Sometimes you can use the same key file, for example, to work with the postman.i2p mail service (you will see below how this is done).

File name:
tunnels.cfg


Content (as an example, we set up an IRC chat on one of the network servers, as well as receiving and sending mail on one of the main mail resources):
[IRC]
type=client
port=666
destination=irc.echelon.i2p
keys=irc.dat

[SMTP]
type=client
port=515
destination=smtp.postman.i2p
keys=mail.dat

[POP3]
type=client
port=616
destination=pop.postman.i2p
keys=mail.dat


You can also download both files ready-made in the archive at rghost.net/8QxX5gTf2 (The link will be working for 90 days from now). It is enough to unpack them into the directory we found above. Make sure the files have the same content as above by opening them with any text editor or processor.

Save and configure both files. Please note: after changing these files you will need to restart i2pd: until this is done, the changes will not take effect!

Return to the browser window. Change the proxy to http 127.0.0.1 and port 4444 (up to version 2.3 - 4446), which is very easy to do using the instructions for any browser (http://ru.wikihow.com/change-proxy-server settings), and feel free to visit sites, we have indicated two network search resources: epsilon.i2p and search.i2p.

# 1 When launched for the first time, i2pd will spend some time getting to know various network nodes (quite possibly several hours) before collecting enough data to run the sites (according to subscriptions.txt).

# 2 To ensure security, i2p constantly builds different tunnels from you to the resource you need. Tunnels take some time to build, which can cause delays in opening sites. Therefore, if the site does not open, refresh the page several times.

# 3 Some sites are run by people just like you. Be more lenient if the resource does not open! It is quite possible that the site you are opening is not on a powerful server, but on exactly the same computer as yours, and may not always be turned on!

More networking instructions can be found here: i2pd.readthedocs.org/en/latest.

It looks like everything is ready. So far there are not very many people using the network, so there are not very many resources. The network is primarily built by those who want to make life better for free. The i2pd developers are also completely free, among them there are many people who speak Russian, you can communicate with them on the #i2pd-ru channel through your IRC program (we have already shared a port for this with you earlier). They do everything to make it more convenient for you to use i2p and hope that users will also help make the network more interesting and better. With you, i2p will become richer, we are sure of it. Good luck using i2p!

PS If you need a build for Windows, detailed instructions are here: habrahabr.ru/post/275647
Tags:
Hubs:
Всего голосов 45: ↑35 и ↓10 +25
Комментарии 78
+78

Comments 78

The question is how fully it supports i2p for the end user? Is there at least surfing on i2p sites, i2p torrenting and the like that is available in the java version?
Supports everything that is in i2p. It is simply faster and, most importantly, more stable.
Supports surfing, hidden services, torrents via BOB.
I described in detail here habrahabr.ru/post/240815
Can you tell me where to find such a headless torrent client??
Preferably with a Web interface. I saw something like i2ptransmission, but I don’t know how relevant it is.
Echelon (echelon.i2p) definitely has.
I still don’t understand how much memory it takes up? It’s possible to run it on some OpenWRT or at least on raspberries?
It’s possible on both Raspberry and OpenWRT. But the RAM must be at least 128MB.
About 30-40 megabytes. It works fine for me on raspberries (the first one).
We also compiled it under OpenWRT and it seemed to work.
Can I expect the package in the OpenWRT repository? (Like Tor now.)
It is possible if there is a maintainer for it.
Is there anyone among the developers who could do this??
I collected previous versions under TL-MR3220V2 (Atheros AR9331@400MHz 32MiB RAM), with swap it works fine and stable
<offtopic&gt; KDPV reminded me of the design of articles in hacker magazine in its heyday>
The pictures (especially in the post about Windows) smack of some kind of cheap bait: “come on, guy, take a pill, my brother is alive, there’s no addiction».
Well, I would love to try the native implementation because on Toad i2p turned out to be too fat:
WARN [impleAppMain] .tunnel.BloomFilterIVValidator: Configured for 4,00MBps share bandwidth but only 368,00MB available memory. Recommend increasing wrapper.java.maxmemory in c:\Program Files\i2p\wrapper.config to at least 422 (MB) if the actual share bandwidth exceeds 4,00MBps.

Those. for at least decent speeds he needs several hundred MB of memory.

PS Time will tell how it will be implemented in i2pd. Before comparative tests of i2pd vs i2p running in parallel on different ports with the same settings on the same host, I definitely won’t touch anything because I don’t want to break a working implementation.

PPS but I still don’t understand what’s wrong with I2P itself. The settings indicate 4096 for incoming and outgoing speeds and the transit share is 100%, but the speeds in peaks through the host are tens of kB/s, no more.
Quite a good tutorial, it will be very useful for beginners.
Thank you
make install

Well, why do that? Checkinstall is there.
Yes, but not everyone has it. It is not included in the standard distribution.
That's why there is a regular Makefile
Like halfall packages delivered in the article.
besides, he is completely unnecessary here.
Has anyone built it under Centos?6?
cmake -DCMAKE_BUILD_TYPE=Release -DBoost_NO_BOOST_CMAKE=BOOL:ON
gives the error error: 'nullptr' was not declared in this scope
What version g++?
Above they asked about the Gcc version, nullptr, this is a C++11 feature, the GCC version seems to be 4.4.7 (https://www.centos.org/forums/viewtopic.php?t=6319), it does not yet support this functional. Most likely it will help you: superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos
Thank you,
It’s great that the project has developed so much since it was first written about on Habré a couple of years ago.
What about the security audit? The original i2p seems to directly warn that there may well be holes, but it seems to have been checked by quite serious people.
Now I have an i2p router in a container, all together it consumes 140 MB of memory. Can I leave everything as it is or does your project provide some additional bonuses??
I'm more interested in the CPU load. It eats noticeably. Or is it no longer optimized??
To reduce the CPU load in the java implementation, you need to enable this in wrapper.config:
# Uncomment this for better performance.
# If it doesn't work, server mode is not available in your JVM.
# This may not be required if your machine is already "server-class".
# See http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html
wrapper.java.additional.7=-server

Also, disabling floodfill will probably help if the processor load is critical. On the page

127.0.0.1:7657/configadvanced

Setting up Floodfill

select “Disable” and click “Save changes”»

PS I don’t know where you have wrapper.config, i2p works for me under Windows and with the default installation the file is in
 %PROGRAMFILES%\i2p\wrapper.config
Thanks, I will take a look. Floodfill was included to make the node better known. Thought it would increase connectivity
Please, I also remembered what’s on the page

127.0.0.1:7657/graphs

Statistics on memory consumption are available. It may very well be that the load on the processor is caused not so much by I2P as by Java itself due to garbage collection. I increased the maximum value of memory consumption, incl. and to maintain higher speed (judging by the logs), the default was 128, set 384:
# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=4

# Maximum Java Heap Size (in MB)
# The JVM's default is 64MB, and I2P can work fine in that, but to handle
# lots of I2PSnark activity in the same JVM, increasing the default max heap
# size should help.  Feel free to reduce this if not using I2PSnark in the jvm
# High-bandwidth routers may need to increase to 256 or more.
#
# WARNING - for any changes to take effect, you must completely
# stop the router and the wrapper. Clicking 'Restart' on your
# router console will NOT reread this file! You must
# click "Shutdown", wait 11 minutes, then start i2p.
#
wrapper.java.maxmemory=384

This setting is all in the same wrapper.config.
It's all because of java. There is no such thing in i2pd simply because the implementation is in C++. i2pd is faster and more stable than the original java implementation.
Such disputes remind me of holivars: twitter has become faster because they rewrote it from ruby ​​to scala
in fact: they completely changed the architecture to microservices and event processing

almost anyone who has seen slow i2p in java and looked at the source code can confirm:
1) one of the main problems is a large context switch, since for each I/O thread it creates a thread
2) almost complete lack of use of nio, most things on standard io
3) the presence of N threads in each of which has a personal buffer puts additional pressure on memory and gc
4) and only in fourth place is encryption-decryption itself

as a result, instead of asynchrony and sane consumption for various I/O buffers, we devour almost everything we can

why not use netty and other network frameworks?
the answer is simple to the point of banality: security, since the current code is terribly simple, it is easier to audit it, and there is no dependence on third-party libraries (through which you can push anything), only bare java core.
Carries. I speak from experience, i2pd works faster, but, most importantly, more stable. Doesn’t crash out of nowhere and doesn’t break off out of the blue.
Mmm... well, I didn’t observe any crashes or crashes, maybe because the virtual machine restarts once a week for backup.
The load now is something like this:
Picture

Damn nodes finally started appearing after turning on floodfill and raising the limit to 4096\4096, otherwise we’ve been working for more than a year and there’s no point.

And the i2pd console interface is just as scary as the official one?
Yes, breaks on a sufficiently strong computer will not be observed so often, but on weaker ones they exist constantly.

And i2pd automatically uses the highest possible speed.

No, the interface is very pleasing to the eye, especially after the official.
i2pd web console
Post me the girl from the topic about Windows and I'm ready to try =)
In general, the interface is really nice, yes.
By the way, who is this girl??
And then there was the annoying connectivity thing. When a node has been running for a couple of months, and some resources are available every other time.
This, I'm afraid, is either by design, or some kind of implementation bug, at this point everyone is complaining, but I never came across a solution “to be sure”.
This is what confuses me. It seems that the maximum flow passed through me, which means everyone should have known me by now. Apparently it still takes a long time to tinker with the protocols.
You can also try here this Post the website addresses of problematic resources; it is also accessible via I2P without xyz. It is possible that the problem is not with you, but the resources themselves are simply lying there. Well, the list of subscriptions is larger because the default one is updated once every eternity, for example, I have this:
subscription list

I’m posting because the list in the topic is a little smaller.
This KDPV reminded me of something…
Spoiler title
-therefore there are not very many resources.

We are waiting for Google for i2p :) or that “Portal with all sites on the network”»
In general, there is Google for i2p.

some kind of proxy? google.i2p is not responding.
elgoog.i2p/
Only you will most likely have to add it to your address book. It's simple. Go to inr.i2p/ and enter the name of this site in the search bar. The Base64 link of this site will be added to your address book automatically.
Yes, i2pd lacks built-in support for jump services: the site was not found, a redirect to a pre-configured jump service. For now you have to use a macro (or what they are called, when you make a bookmark in the browser, give it a short name and substitute %s in the right place in the address?) in the browser: “j site.i2p”, which sends to «inr.i2p/jump/site.i2p»
Does KDPV have highrez? I would hang it in the office.
No one has pushed this into the ppa yet, so as not to rebuild it manually?
How to allow access not only from localhost?
Not at all. This is a feature of the network, one of the pillars on which the anonymity of the network is built..

But, excuse me, why do you need this??
Run i2pd on banana and have access to i2p from android/winphone.
Ummm... configure iptables port forwarding yourself, no?
What exactly is needed? For tunnels, write in the address field 0.0.0.0.
For HTTP proxy - parameter httpproxyaddress and so on
I can't access the web interface from outside. I deployed i2pd on a separate virtual machine, just like regular i2p earlier. Where in the configs should I write the permission for access from everywhere 0.0.0.0 and the port? Roughly speaking, I need to go to 192.168.100.10 and see the management interface there.
Actually, this is what I need.
With java i2p it is possible.
-httpport=192.168.100.10 then it will be possible to log in from the network 192.168.100.*
if from anywhere at all then -httpport=0.0.0.0
Similar for other services.
This is in which config file?
It looks more like a launch string argument.
This is a command line option. or you can write them in a separate config file and pass the file name as a parameter
And regarding the normal config file, can I point to the manual? In regular i2p, this was solved by editing one line in /etc/i2p/whattotam.cfg
Config: ~/.i2pd/i2p.conf
An example can be seen in the distribution (in the debugger from the off site it is: /var/lib/i2pd/i2p.conf)
but in general everything is simple there: <опция без --> = <значение>
see options: i2pd --help or /usr/share/doc/i2pd/configuration.md
Thank you.
Please explain a couple of questions:
1. Until i2pd polls the entire network, I won’t be able to connect to search.i2p?
2. search.i2p or http:// search.i2p?
3. But we haven’t created a client tunnel, how will we connect via http??

In general, I would like more information about the principles of i2pd operation... I would be grateful for the links)
and by the way, my port worked 4444 and not 4446, which is suggested to be used in the article…
Just changed to 4444 yesterday.
It will be possible to connect as soon as the address book is downloaded, and this is when the first tunnels are built.
search.i2p
at the make stage there were a bunch of warnings about some empty parameters and in the end it crashed with the error “not enough memory”».
VPS 1 gig RAM.
no ice.
I was recommended this as an alternative to the “gluttonous” Java))
How is the gluttony of compilation and the gluttony of work related??
C++ really takes a long time and is difficult to compile, but it works quickly.
correct point.

in general, according to the instructions it was not installed.
I took it already in the form of a ready-made package.
.deb I also tried - there were some problems there too (I don’t remember what exactly, but I had to remove them later)

in general, I’ll do it the old fashioned way, in Java -)

**By the way, what package did you install? I have Ubuntu 16.04
Also Ubuntu 16.04 Server. I don't remember where the package came from.
Only full-fledged users can leave comments. Sign in, Please.